<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<link rel="stylesheet" type="text/css" href="${path}/css/system/upload.css">
<script type="text/javascript" src="${path}/js/system/account.js"></script>
<script type="text/javascript">
	$(function() {
		
// 		loadResidence('');
		loadAccountType();
		$('#form').form({
			url : '/account/add',
			onSubmit : function() {
				parent.$.messager.progress({
					title : '提示',
					text : '数据处理中，请稍后....'
				});
				var isValid = $(this).form('validate');
				if (!isValid) {
					parent.$.messager.progress('close');
				}
				return isValid;
			},
			success : function(result) {
				parent.$.messager.progress('close');
				result = $.parseJSON(result);
				parent.$.messager.alert("提示",result.msg,"info");
				if (result.success) {
					parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_treeGrid这个对象，是因为resource.jsp页面预定义好了
					parent.$.modalDialog.handler.dialog('close');
				}
			}
		});
		parent.$.messager.progress('close');
		loadUploadChange();
	});
	
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" title="" style="overflow: auto;">
		<form id="form" method="post" enctype="multipart/form-data">
			<table class="table table-hover table-condensed">
<!-- 				<tr> -->
<!-- 					<td>小区</td> -->
<!-- 					<td><input id="residenceId" name="residenceId" /></td> -->
<!-- 					<td>楼栋</td> -->
<!-- 					<td><input id="buildingId" name="buildingId" class="easyui-combobox" panelHeight='auto' /></td> -->
<!-- 				</tr> -->
<!-- 				<tr> -->
<!-- 					<td>单元</td> -->
<!-- 					<td><input id="unitId" name="unitId" class="easyui-combobox" panelHeight='auto' /></td> -->
<!-- 					<td>门牌</td> -->
<!-- 					<td><input id="doorId" name="doorId" class="easyui-combobox" panelHeight='auto' required='true' /></td> -->
<!-- 				</tr> -->
				<tr>
					<td>用户类型</td>
					<td><input id="typeId" name="typeId" class="easyui-combobox" panelHeight='auto' required='true' /></td>
					<td>用户姓名</td>
					<td><input id="name" name="name" class="easyui-validatebox" required='true' /></td>
				</tr>
				<tr>
					<td>登录名</td>
					<td><input id="loginName" name="loginName" class="easyui-validatebox" required='true' /></td>
					<td>登录密码</td>
					<td><input id="loginPwd" name="loginPwd" class="easyui-validatebox" required='true' value="123456" /></td>
				</tr>
				<tr>
					<td>手机号码</td>
					<td><input id="mobile" name="mobile" class="easyui-validatebox" /></td>
					<td>性别</td>
					<td>
						男:<input type="radio" name='sex' value="1" checked="checked" />
						女:<input type="radio" name='sex' value="0" />
					</td>
					
				</tr>
				<tr>
<!-- 					<td>业主</td> -->
<!-- 					<td> -->
<!-- 						是:<input type="radio" name='owner' value="1" /> -->
<!-- 						否:<input type="radio" name='owner' value="0" checked="checked" /> -->
<!-- 					</td> -->
					<td>用户头像</td>
					<td colspan="3">
						<div class="file-group">
							<input id="headImage" name="head" type="file"/>
							选择头像					
						</div>
					</td>
				</tr>
				<tr>
					<td colspan="4" align="center">
						<img id="imgView" width="130px" alt="" src="">
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>